<template>
  <el-form-item label="选择时区" class="xFtimezoneProps">
    <el-select v-model="tempValue" size="mini">
      <el-option v-for="(item, idx) in list" :key="idx" :label="item.name" :value="item.value"></el-option>
    </el-select>
  </el-form-item>
</template>

<script>
export default {
  name: 'attr-sxc-timeZone',
  props: {
    timeZone: {
      type: String,
      default: ''
    }
  },
  data () {
    return {
      list: [{
        name: '中时区 ( UTC +0 )',
        value: 'Etc/GMT'
      }, {
        name: '东一区 ( UTC +1 )',
        value: 'Africa/Lagos'
      }, {
        name: '东二区 ( UTC +2 )',
        value: 'Africa/Cairo'
      }, {
        name: '东三区 ( UTC +3 )',
        value: 'Asia/Baghdad'
      }, {
        name: '东四区 ( UTC +4 )',
        value: 'Asia/Tbilisi'
      }, {
        name: '东五区 ( UTC +5 )',
        value: 'Asia/Tashkent'
      }, {
        name: '东六区 ( UTC +6 )',
        value: 'Asia/Almaty'
      }, {
        name: '东七区 ( UTC +7 )',
        value: 'Asia/Bangkok'
      }, {
        name: '东八区 ( UTC +8 )',
        value: 'Asia/Shanghai'
      }, {
        name: '东九区 ( UTC +9 )',
        value: 'Asia/Tokyo'
      }, {
        name: '东十区 ( UTC +10 )',
        value: 'Australia/Sydney'
      }, {
        name: '东十一区 ( UTC +11 )',
        value: 'Pacific/Guadalcanal'
      }, {
        name: '东西十二区 ( UTC +12 )',
        value: 'Etc/GMT-12'
      }, {
        name: '西一区 ( UTC -1 )',
        value: 'Atlantic/Azores'
      }, {
        name: '西二区 ( UTC -2 )',
        value: 'Etc/GMT+2'
      }, {
        name: '西三区 ( UTC -3 )',
        value: 'America/Montevideo'
      }, {
        name: '西四区 ( UTC -4 )',
        value: 'America/La_Paz'
      }, {
        name: '西五区 ( UTC -5 )',
        value: 'America/Bogota'
      }, {
        name: '西六区 ( UTC -6 )',
        value: 'America/Guatemala'
      }, {
        name: '西七区 ( UTC -7 )',
        value: 'America/Phoenix'
      }, {
        name: '西八区 ( UTC -8 )',
        value: 'America/Los_Angeles'
      }, {
        name: '西九区 ( UTC -9 )',
        value: 'America/Anchorage'
      }, {
        name: '西十区 ( UTC -10 )',
        value: 'Pacific/Honolulu'
      }, {
        name: '西十一区 ( UTC -11 )',
        value: 'Etc/GMT+11'
      }],
      tempValue: ''
    }
  },
  mounted () {
    this.tempValue = this.timeZone
  },
  watch: {
    timeFormat (val) {
      this.tempValue = val
    },
    tempValue () {
      this.$emit('update:timeZone', this.tempValue)
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
